-- GENERATED SPELL FOR [Sunscale Lashtail] --


function spell0_3254(pUnit, Event) --@Claw,n/a--
pUnit:FullCastSpellOnTarget(16828,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3254', 607, 1)
end

function spell1_3254(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3254', 0, 1)
end

function spell2_3254(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14916,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3254', 0, 1)
end

function spell3_3254(pUnit, Event) --@Lash,n/a--
pUnit:FullCastSpellOnTarget(6607,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3254', 1000, 1)
end

function spell4_3254(pUnit, Event) --@Savage Rend,n/a--
pUnit:FullCastSpellOnTarget(50498,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3254', 15000, 1)
end

function spell5_3254(pUnit, Event) --@Spirit Decay,n/a--
pUnit:FullCastSpellOnTarget(8016,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3254', 2000, 1)
end

function Sorts_3254(pUnit, Event)
local choix_sorts_3254 = math.random(0, 5)
if choix_sorts_3254 == 0 then
pUnit:RegisterEvent('spell0_3254', 1, 1)
end
if choix_sorts_3254 == 1 then
pUnit:RegisterEvent('spell1_3254', 1, 1)
end
if choix_sorts_3254 == 2 then
pUnit:RegisterEvent('spell2_3254', 1, 1)
end
if choix_sorts_3254 == 3 then
pUnit:RegisterEvent('spell3_3254', 1, 1)
end
if choix_sorts_3254 == 4 then
pUnit:RegisterEvent('spell4_3254', 1, 1)
end
if choix_sorts_3254 == 5 then
pUnit:RegisterEvent('spell5_3254', 1, 1)
end
end

function mob3254_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3254', math.random(1500, 3000), 1)
end

function mob3254_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3254_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3254_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3254, 1, 'mob3254_Action')
RegisterUnitEvent(3254, 2, 'mob3254_Leave')
RegisterUnitEvent(3254, 3, 'mob3254_Kill')
RegisterUnitEvent(3254, 4, 'mob3254_Die')
